<template>
    <div class="adminAudit">
        <div>
            <el-steps class="steps" :active="active" finish-status="success">
                <el-step title="申请开店"></el-step>
                <el-step title="开店须知"></el-step>
                <el-step title="店铺信息"></el-step>
                <el-step title="平台审核"></el-step>
                <el-step title="在线签约"></el-step>
            </el-steps>
            <div class="auditFont">请联系客服线下进行签约</div>
        </div>
        <div class="img"><img src="./img/delAudit.jpg" @click="dialogVisible = true" style="width: 80px;float:right"></div>
        <el-dialog
                title="正在操作撤销店铺入驻申请"
                :visible.sync="dialogVisible"
                width="30%"
                :before-close="handleClose">
            <span>用户编号:<input style="height: 20px" v-model ="userCode" ></span><br>
            <span>身份证号:<input style="height: 20px;margin-top: 10px" v-model ="userCard" ></span>
            <span slot="footer" class="dialog-footer">
                <el-button @click="dialogVisible = false">取 消</el-button>
                <el-button type="primary" @click="delShop()">确 定</el-button>
              </span>
        </el-dialog>
    </div>
</template>
<script>
    import {delShop} from '@/api/shop'
    export default {
        data() {
            return{
                userCard:null,
                userCode:null,
                active:5,
                dialogVisible:false
            }
        },
        methods:{
            delShop(){
                this.$confirm('是否确认撤销店铺入驻申请？')
                    .then(_ => {
                        if (this.userCode == null || this.userCode == ''){
                            this.$message.error("请输入用户编号");
                            return
                        }
                        if (this.userCard == null || this.userCard == ''){
                            this.$message.error("请输入用户身份证号码");
                            return
                        }
                        delShop(this.userCode,this.userCard).then(res =>{
                            if (res.code == 10000){
                                this.$message.success("撤销入驻申请成功")
                                this.dialogVisible = false;
                            }else {
                                this.$message.error("撤销入驻申请失败")
                            }
                        })
                    })
                    .catch(_ => {});

            },
            handleClose(done) {
                this.$confirm('确认关闭？')
                    .then(_ => {
                        done();
                    })
                    .catch(_ => {});
            },
        }

    }
</script>
<style scoped>
    .adminAudit {
        width: 800px;
        margin: 0 auto;
    }
    .steps{
        margin-top: 50px;
    }
    .auditFont{
        margin-top: 100px;
        text-align: center;
    }
    .img{
        position: fixed;
        top: 390px;
        right: 0;
    }
</style>